package org.geektimes.context;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @ClassName: ComponentContextListener
 * @Description:
 * @Author: Hades
 * @created: 2021/03/24 23:48
 * @Version:1.0
 */
public class ComponentContextListener implements ServletContextListener {

    private ServletContext servletContext;

    public ComponentContextListener(ServletContext servletContext){
        this.servletContext = servletContext;
    }

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        ComponentContext componentContext = new ComponentContext();
        componentContext.init(servletContext);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
